Skip to content

Comments

Address feedback #2#419

Merged
pileks merged 35 commits intodevelopfrom
pileks/met-100-address-issues
Feb 18, 2026
Merged

Address feedback #2#419
pileks merged 35 commits intodevelopfrom
pileks/met-100-address-issues

Conversation

@pileks
Copy link
Contributor

@pileks pileks commented Feb 6, 2026

Program Instruction Changes

futarchy

initialize_dao / update_dao — new DAO invariant checks reject zero values

Three new invariant checks are enforced. Any initialize_dao or update_dao call that sets any of these to 0 will now fail:

  • min_base_futarchic_liquidity > 0
  • min_quote_futarchic_liquidity > 0
  • twap_max_observation_change_per_update > 0

launch_proposal — rejects zero reserves

New require_gt! checks on base_to_lp and quote_to_lp. A proposal whose spot pool has insufficient reserves (resulting in zero after halving) will now fail to launch.

provide_liquidity — rejects zero base amount

New require_gt!(max_base_amount, 0) check. Calls with max_base_amount = 0 will now fail.

v06_launchpad

complete_launch — DAO created with non-zero min futarchic liquidity

min_quote_futarchic_liquidity and min_base_futarchic_liquidity changed from 0 to 1. DAOs created by this instruction will have stricter invariants than before.

v07_launchpad

complete_launch — same change as v06_launchpad

min_quote_futarchic_liquidity and min_base_futarchic_liquidity changed from 0 to 1.


Additional notes

  • PDA seed byte strings extracted into named constants — identical bytes, no on-chain effect
  • Dao account boxed in CollectFees, UpdateDao, WithdrawLiquidity — Rust memory optimization only, no wire format or IDL change
  • Arbitrage early-exit optimization — saves compute, no behavioral change for callers
  • finalize_proposal safe cast (as i16i16::try_from()) — unreachable in practice due to MAX_PASS_THRESHOLD_BPS = 1_000 invariant

pileks added 30 commits January 20, 2026 16:37
@pileks pileks requested review from jrooks7 and metaproph3t February 6, 2026 01:34
@pileks pileks changed the base branch from pileks/met-75-fixes to develop February 11, 2026 22:08
@pileks pileks self-assigned this Feb 11, 2026
@pileks pileks merged commit 554bd9b into develop Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant